package com.karolak.stock.strategy;

public class Config {

	private int period;
	private int[] periodMultipliers;
	private int fftPeriod;

	private double signalThreshold;
	private double votingThreshold;

	private int historySize;
	private int chartSize;
	
	// === get/set === //
	protected double getSignalThreshold() {
		return signalThreshold;
	}

	protected void setSignalThreshold(double signalThreshold) {
		this.signalThreshold = signalThreshold;
	}

	protected double getVotingThreshold() {
		return votingThreshold;
	}

	protected void setVotingThreshold(double votingThreshold) {
		this.votingThreshold = votingThreshold;
	}

	protected int[] getPeriods() {
		if (getPeriodMultipliers() == null) {
			return new int[] {};
		}
		int[] periods = new int[getPeriodMultipliers().length];
		for (int i = 0; i < getPeriodMultipliers().length; i++) {
			periods[i] = getPeriodMultipliers()[i] * getPeriod();
		}
		return periods;
	}

	public int getHistorySize() {
		return historySize;
	}

	protected void setHistorySize(int historySize) {
		this.historySize = historySize;
	}

	protected int getFftPeriod() {
		return fftPeriod;
	}

	protected void setFftPeriod(int fftPeriod) {
		this.fftPeriod = fftPeriod;
	}

	protected int getPeriod() {
		return period;
	}

	protected void setPeriod(int period) {
		this.period = period;
	}

	protected int[] getPeriodMultipliers() {
		return periodMultipliers;
	}

	protected void setPeriodMultipliers(int[] periodMultipliers) {
		this.periodMultipliers = periodMultipliers;
	}

	public int getChartSize() {
		return chartSize;
	}

	protected void setChartSize(int chartSize) {
		this.chartSize = chartSize;
	}

}
